/**
 * Created by ztt on 2018/12/2.
 * todo:subscription陷阱
 */
function index03() {
    var observable = Rx.Observable.interval(1000);
    var subscription = observable.subscribe(x => console.log(x));
    setTimeout(()=>{
        //subscription里面的有个方法 unsubscribe可以取消订阅observable里发射的数据
        // 但是Observable仍然在吐数字
        subscription.unsubscribe();
    },3000)
}
